<template>
  <el-dialog :visible.sync="visible" v-dialogDrag :title="title" :close-on-click-modal="false" class="tl-dialog" width="1200px" @open="open" @close="close">
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" :disabled="disableEditSubmit">
      <el-row>
        <el-col :span="12">
					<el-form-item label="来源系统" prop="sourceapp" >
						<el-select v-model="model.sourceapp" filterable clearable>
							<el-option v-for="item in codeModel.sourceappList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
        <el-col :span="12">
          <el-form-item label="来源业务模块" prop="sourcetype">
            <el-select v-model="model.sourcetype" filterable clearable>
              <el-option v-for="item in codeModel.sourcetypeList" :key="item.code" :label="item.name" :value="item.code" />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="来源单号" prop="sourceid">
            <el-input v-model="model.sourceid"></el-input>
          </el-form-item>
        </el-col>

        <el-col :span="12">
          <el-form-item label="通知类型" prop="noticetype">
            <el-select v-model="model.noticetype" filterable clearable>
              <el-option v-for="item in codeModel.noticetypeList" :key="item.code" :label="item.name" :value="item.code" />
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="下次通知时间" prop="nextnoticetime">
            <el-date-picker v-model="model.nextnoticetime" type="date" placeholder="下次通知时间" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="最近通知时间" prop="lastnoticetime">
            <el-date-picker v-model="model.lastnoticetime" type="date" placeholder="最近通知时间" value-format="yyyy-MM-dd"></el-date-picker>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="12">
          <el-form-item label="已通知次数" prop="noticecount">
            <el-input-number v-model="model.noticecount" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="Get参数" prop="getparam">
            <el-input v-model="model.getparam"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="Post参数" prop="postparam">
            <el-input v-model="model.postparam" type="textarea" :rows="4"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row> </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="返回值" prop="responsemsg">
            <el-input v-model="model.responsemsg" type="textarea" :rows="2"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="备注" prop="description">
            <el-input v-model="model.description" type="textarea" :rows="2"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button :type="disableEditSubmit === false ? 'text' : 'primary'" @click="doCancelEdit">取消</el-button>
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading" v-if="disableEditSubmit === false">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: {},
  data() {
    return {
      moduleTitle: '接口通知任务',
      urlPrefix: '/sys/apiNoticeTask/',
      url: {
        // 额外的url
      }
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
    }
  }
}
</script>
